package com.mhfelipe.applet.print;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;

public class PrintDirectPort extends AbstractPrint {

    private final HashMap<Integer, String> contentCache = new HashMap<Integer, String>();

    public void start() {

        String port = getParameter("port");

        try {
            FileWriter writer = new FileWriter(new File(port));
            writer.write(getContent());
            writer.close();
        } catch(IOException e) {
            e.printStackTrace();
        }
    }

}
